sched: better handle (not) inserting idle vCPUs in runqueues
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 24 Nov 2015 13:49:47 +0000 (14:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Nov 2015 13:49:47 +0000 (14:49 +0100)
commit6b53bb4ab3c9bd5eccde88a5175cf72589ba6d52
treeda8764a2cf28f9b4867ead8943ff90a6cbffb504
parenta8c6c623192e3610033e8c79533bd0995038c4dc
sched: better handle (not) inserting idle vCPUs in runqueues

Idle vCPUs are set to run immediately, as a part of their
own initialization, so we shouldn't even try to put them
in a runqueue. In fact, no scheduler does that, even when
asked to (that is rather explicit in Credit2 and RTDS, a
bit less evident in Credit1).

Let's make things look as follows:
 - in generic code, explicitly avoid even trying to
   insert idle vCPUs in runqueues;
 - in specific schedulers' code, enforce that.

Note that, as csched_vcpu_insert() is no longer being
called, during boot (from sched_init_vcpu()) we can
safely avoid saving the flags when taking the runqueue
lock.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_rt.c
xen/common/schedule.c